package com.example.demo.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @Author: FKJGFK
 * @Date: 2021/5/7 16:44
 * @Description: 每日APP出现的安全问题 消费者
 */
@Slf4j
@Component
public class AppSafeConsumerListener {

    @KafkaListener(topics = "${topic.AppSafeLog}")
    public void listen(ConsumerRecord<String, String> consumerRecord) {
        log.info("AppSafeConsumerListener-> 主题:{}, 内容: {}", consumerRecord.topic(), consumerRecord.value());
        //todo something here

    }


}

